import {createRouter, createWebHashHistory, RouteRecordRaw} from "vue-router"

const routes: Array<RouteRecordRaw> = [
    {
        path: "/login",
        name: "Login",
        component: () => import("@/views/Login/Login.vue")
    },
    {
        path: "/visual-view",
        name: "VisualView",
        component: () => import("@/views/VisualizationSystem/VisualizationSystem.vue")
    },
    {
        path: "/",
        redirect: "/home",
        component: () => import("@/Layout/Layout.vue"),
        children: [
            {
                path: "home",
                name: "Home",
                component: () => import("@/views/Home/Home.vue")
            },
            {
                path: "user",
                name: "User",
                component: () => import("@/views/User/User.vue")
            },
            {
                path: "pretty",
                name: "Pretty",
                component: () => import("@/views/Pretty/Pretty.vue")
            },
            {
                path: "admin",
                name: "Admin",
                component: () => import("@/views/Admin/Admin.vue")
            },
            {
                path: ":pathMatch(.*)*",
                name: "NotFound",
                component: () => import("@/views/NotFound/NotFound.vue")
            }
        ]
    },
]

const router = createRouter({
    routes,
    history: createWebHashHistory()
})
export default router
